## API Report File for "@backstage/plugin-catalog-node"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
/// <reference types="node" />

import { AnalyzeLocationExistingEntity } from '@backstage/plugin-catalog-common';
import { CompoundEntityRef } from '@backstage/catalog-model';
import { Entity } from '@backstage/catalog-model';
import { JsonValue } from '@backstage/types';
import { LocationEntityV1alpha1 } from '@backstage/catalog-model';
import { LocationSpec as LocationSpec_2 } from '@backstage/plugin-catalog-common';

// @public (undocumented)
export type AnalyzeOptions = {
  url: string;
  catalogFilename?: string;
};

// @public (undocumented)
export type CatalogProcessor = {
  getProcessorName(): string;
  readLocation?(
    location: LocationSpec_2,
    optional: boolean,
    emit: CatalogProcessorEmit,
    parser: CatalogProcessorParser,
    cache: CatalogProcessorCache,
  ): Promise<boolean>;
  preProcessEntity?(
    entity: Entity,
    location: LocationSpec_2,
    emit: CatalogProcessorEmit,
    originLocation: LocationSpec_2,
    cache: CatalogProcessorCache,
  ): Promise<Entity>;
  validateEntityKind?(entity: Entity): Promise<boolean>;
  postProcessEntity?(
    entity: Entity,
    location: LocationSpec_2,
    emit: CatalogProcessorEmit,
    cache: CatalogProcessorCache,
  ): Promise<Entity>;
};

// @public
export interface CatalogProcessorCache {
  get<ItemType extends JsonValue>(key: string): Promise<ItemType | undefined>;
  set<ItemType extends JsonValue>(key: string, value: ItemType): Promise<void>;
}

// @public (undocumented)
export type CatalogProcessorEmit = (generated: CatalogProcessorResult) => void;

// @public (undocumented)
export type CatalogProcessorEntityResult = {
  type: 'entity';
  entity: Entity;
  location: LocationSpec_2;
};

// @public (undocumented)
export type CatalogProcessorErrorResult = {
  type: 'error';
  error: Error;
  location: LocationSpec_2;
};

// @public (undocumented)
export type CatalogProcessorLocationResult = {
  type: 'location';
  location: LocationSpec_2;
};

// @public
export type CatalogProcessorParser = (options: {
  data: Buffer;
  location: LocationSpec_2;
}) => AsyncIterable<CatalogProcessorResult>;

// @public (undocumented)
export type CatalogProcessorRefreshKeysResult = {
  type: 'refresh';
  key: string;
};

// @public (undocumented)
export type CatalogProcessorRelationResult = {
  type: 'relation';
  relation: EntityRelationSpec;
};

// @public (undocumented)
export type CatalogProcessorResult =
  | CatalogProcessorLocationResult
  | CatalogProcessorEntityResult
  | CatalogProcessorRelationResult
  | CatalogProcessorErrorResult
  | CatalogProcessorRefreshKeysResult;

// @public
export type DeferredEntity = {
  entity: Entity;
  locationKey?: string;
};

// @public
export type EntitiesSearchFilter = {
  key: string;
  values?: string[];
};

// @public
export type EntityFilter =
  | {
      allOf: EntityFilter[];
    }
  | {
      anyOf: EntityFilter[];
    }
  | {
      not: EntityFilter;
    }
  | EntitiesSearchFilter;

// @public
export interface EntityProvider {
  connect(connection: EntityProviderConnection): Promise<void>;
  getProviderName(): string;
}

// @public
export interface EntityProviderConnection {
  applyMutation(mutation: EntityProviderMutation): Promise<void>;
  refresh(options: EntityProviderRefreshOptions): Promise<void>;
}

// @public
export type EntityProviderMutation =
  | {
      type: 'full';
      entities: DeferredEntity[];
    }
  | {
      type: 'delta';
      added: DeferredEntity[];
      removed: (
        | DeferredEntity
        | {
            entityRef: string;
            locationKey?: string;
          }
      )[];
    };

// @public
export type EntityProviderRefreshOptions = {
  keys: string[];
};

// @public
export type EntityRelationSpec = {
  source: CompoundEntityRef;
  type: string;
  target: CompoundEntityRef;
};

// @public @deprecated
export type LocationSpec = LocationSpec_2;

// @public
export function locationSpecToLocationEntity(opts: {
  location: LocationSpec_2;
  parentEntity?: Entity;
}): LocationEntityV1alpha1;

// @public
export function locationSpecToMetadataName(location: LocationSpec_2): string;

// @public (undocumented)
export type PlaceholderResolver = (
  params: PlaceholderResolverParams,
) => Promise<JsonValue>;

// @public (undocumented)
export type PlaceholderResolverParams = {
  key: string;
  value: JsonValue;
  baseUrl: string;
  read: PlaceholderResolverRead;
  resolveUrl: PlaceholderResolverResolveUrl;
  emit: CatalogProcessorEmit;
};

// @public (undocumented)
export type PlaceholderResolverRead = (url: string) => Promise<Buffer>;

// @public (undocumented)
export type PlaceholderResolverResolveUrl = (
  url: string,
  base: string,
) => string;

// @public
export const processingResult: Readonly<{
  readonly notFoundError: (
    atLocation: LocationSpec_2,
    message: string,
  ) => CatalogProcessorResult;
  readonly inputError: (
    atLocation: LocationSpec_2,
    message: string,
  ) => CatalogProcessorResult;
  readonly generalError: (
    atLocation: LocationSpec_2,
    message: string,
  ) => CatalogProcessorResult;
  readonly location: (newLocation: LocationSpec_2) => CatalogProcessorResult;
  readonly entity: (
    atLocation: LocationSpec_2,
    newEntity: Entity,
  ) => CatalogProcessorResult;
  readonly relation: (spec: EntityRelationSpec) => CatalogProcessorResult;
  readonly refresh: (key: string) => CatalogProcessorResult;
}>;

// @public (undocumented)
export type ScmLocationAnalyzer = {
  supports(url: string): boolean;
  analyze(options: AnalyzeOptions): Promise<{
    existing: AnalyzeLocationExistingEntity[];
  }>;
};
```
